package com.feng.zhihao.apigeteway.gateway.bean.impl.GENERATION_RULE;

import org.springframework.stereotype.Component;

import com.feng.zhihao.apigeteway.entity.InterfaceFieldGenerationRule;
import com.feng.zhihao.apigeteway.entity.InterfaceFieldInfo;
import com.feng.zhihao.apigeteway.gateway.ReqContext;
import com.feng.zhihao.apigeteway.gateway.bean.GENERATION_RULE;
import com.xiaoleilu.hutool.util.RandomUtil;

@Component("GENERATION_RULE_BOOLEAN")
public class GENERATION_RULE_BOOLEAN implements GENERATION_RULE{

	@Override
	public Object generationValue(InterfaceFieldInfo interfaceFieldInfo,
			InterfaceFieldGenerationRule rule, ReqContext reqContext) {
		return RandomUtil.randomInt(0,1) == 1?true:false;
	}

}
